package com.kaili.basic.mapper;


import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.kaili.basic.pojo.dto.BaseProductQueryDto;
import com.kaili.basic.pojo.dto.SupplierQueryDto;
import com.kaili.basic.pojo.entity.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;


/**
 * Created by xxx on 18-4-25.
 */

@Mapper
public interface SupplierMapper {
    //添加供应商
    int addSupplier(Supplier supplier);

    //删除供应商
    int deleteSuppliers(Map<String, Object> map);

    //修改供应商
    int updateSupplier(Supplier supplier);

    //条件查询获取供应商详细信息
    List<Supplier> querySupplier(Pagination page, Supplier supplier);

    //模糊查询获取供应商详细信息带出计量单位集合和产品类别集合
    List<SupplierSortUnit> dimQuerySupplier(String parameterName);

    //id查询获取供应商详细信息带出计量单位集合和产品类别集合
    SupplierSortUnit querySupplierSortUnit(Long supplierId);

    Supplier querySupplierById(Long supplierId);

    //查询供应商下的产品
    List<SupplierProduct> querySupplierProduct(Pagination page, BaseProductQueryDto queryDto);

    //获取所有供应商
    List<SupplierAllQuery> queryAllSupplier();

    //查询当前数据库中的最大ID
    Long getMaxSupplierId();

    //导出
    List<SupplierExport> querySupplierExport(SupplierQueryDto supplierQueryDto);
}
